<wxs module="dateFr" src="../../js/filter.wxs"></wxs>
<import src="../detail/detail" />
<template is="{{template}}" data="{{my_toast_tip: my_toast_tip}}" />
<!-- 浮层 -->
<view id='float_view' wx:if="{{showFloat}}" bindtap='hideOrder'></view>
<!-- 订单确认页 -->
<view id='oderView' wx:if="{{showOrdermsg}}">
    <label class="oderView_title">订单确认</label>
    <div>
        <label>{{addressString}}:</label><span>{{addressString}}</span></div>
    <div>
        <label>{{orderMsgTime}}:</label><span>{{orderMsgTimeNote}}</span></div>
    <label class="oderView_msg">请在商城开放时间完成订餐操作，如在关闭时间订餐，选择的时间会在下次开店时间内生效</label>
    <label class="makeSure" bindtap='payMakersure'>确定</label>
</view>
<!-- 自定义事件选择器-->
<view id='address_picker' wx:if='{{showAddressPick}}'>
    <view id='time_type'>
        <label class="{{item.style}}"  data-type='{{index}}' wx:for='{{timeType}}' style='width: {{750/timeType.length+"rpx"}}'>选择地点</label>
        <span wx:if='{{timeType.length>0}}' style="left:325rpx"></span>
    </view>
    <picker-view indicator-style="height: 50px;" bindchange="bindChangeAddress" value='{{chooseAddress}}'>
        <picker-view-column >
            <view wx:for="{{newAddressArr}}" style="line-height: 50px;">{{item.shopName}}</view>
        </picker-view-column>
    </picker-view>
    <view id='makeSure_view'>
        <label bindtap='cancelAddressAction'>取消</label>
        <label bindtap='makeAddressAction'>确认</label>
    </view>
</view>
<!-- 自定义事件选择器-->
<view id='time_picker' wx:if='{{showTimePick}}'>
    <view id='time_type'>
        <label class="{{item.style}}"  data-type='{{index}}' wx:for='{{timeType}}' style='width: {{750/timeType.length+"rpx"}}'>{{item.name}}</label>
        <span wx:if='{{timeType.length>0}}' style="left:325rpx"></span>
    </view>
    <picker-view indicator-style="height: 50px;" bindchange="bindChange" value='{{chooseTime}}'>
        <picker-view-column >
            <view wx:for="{{newTimeArr}}" style="line-height: 50px;">{{item}}</view>
        </picker-view-column>
    </picker-view>
    <view id='rules'>
        <!-- <label>每天提取有效时间段:<span>{{timeNote.start}}--{{timeNote.end}}</span></label> -->
        <label>温馨提示</label>
        <label>请指定时间及时取餐，以免影响送达</label>
    </view>
    <view id='makeSure_view'>
        <label bindtap='cancelTimeAction'>取消</label>
        <label bindtap='makeTimeAction'>确认</label>
    </view>
</view>
<!-- <view id='time_picker' wx:if='{{showTimePick}}'>
    <view id='time_type'>
        <label class="{{item.style}}"  data-type='{{index}}' wx:for='{{timeType}}' style='width: {{750/timeType.length+"rpx"}}'>{{item.name}}</label>
        <span wx:if='{{timeType.length>0}}' style="left:325rpx"></span>
    </view>
    <picker-view indicator-style="height: 50px;" bindchange="bindChange" value='{{chooseTime}}'>
        <picker-view-column wx:for='{{pickerArr}}'>
            <view wx:for="{{item.timeArr}}" style="line-height: 50px;">{{item}}</view>
        </picker-view-column>
    </picker-view>
    <view id='rules'>
        <label>每天提取有效时间段:<span>{{timeNote.start}}--{{timeNote.end}}</span></label>
        <label>请指定时间及时取餐，以免影响送达</label>
    </view>
    <view id='makeSure_view'>
        <label bindtap='cancelTimeAction'>取消</label>
        <label bindtap='makeTimeAction'>确认</label>
    </view>
</view> -->
<!-- 自定义支付类型选择 -->
<view id='pay_picker' wx:if='{{showPayPick}}'>
    <label bindtap='cancelPayAction'>选择支付方式
        <image src="{{imageUrl}}/meal_icon_delete.png"></image>
    </label>
    <label bindtap='choosePatType' data-code='0'>
        <image class='logo_style' src="{{urlAddress}}/pay_balance.png"></image><span>余额剩余:{{balance}}元</span>
        <image wx:if='{{payType=="4"}}' class='select_styles' src="{{urlAddress}}/pay_select.png"></image>
        <image wx:if='{{payType=="11"}}' class='select_styles' src="{{urlAddress}}/pay_unselect.png"></image>
    </label>
    <view class="line"></view>
    <label bindtap='choosePatType' data-code='1'>
        <image class='logo_style' src="{{urlAddress}}/icon_wechat.png"></image><span>微信支付</span>
        <image wx:if='{{payType=="11"}}' class='select_styles' src="{{urlAddress}}/pay_select.png"></image>
        <image wx:if='{{payType=="4"}}' class='select_styles' src="{{urlAddress}}/pay_unselect.png"></image>
    </label>
</view>
<!-- 页面 -->
<view id='payView'>
    <!-- <image class='bg_style' src="{{imageUrl}}/reserveBackground.png" /> -->
    <view id='topView'>
        <!--  <view id='menu' >
            <label wx:if='{{isCanSend&&isCanget}}' class='menu_style {{class1}}' bindtap='chooseWay' data-type='unsend'>到店自提</label>
            <span class="line" wx:if='{{isCanSend&&isCanget}}'></span>
            <label wx:if='{{isCanSend&&isCanget}}'  class='menu_style {{class2}}' bindtap='chooseWay' data-type='send'>外卖配送</label>
            <label  wx:if='{{isCanSend&&!isCanget}}'  class='menu_unstyle' >外卖配送</label>
            <label  wx:if='{{!isCanSend&&isCanget}}' class='menu_unstyle' >到店自提</label>
        </view> -->
        <div style="display: block;height: 20rpx;"></div>
         <view id='nMenu'>
             <image src="{{imageUrl}}/meal_icon_jiucan.png" />
                   
             <label>配送方式</label>
             <div>
                 <label bindtap='chooseWay' data-code='10' class="{{zitiStyle}}">自提</label>
                 <!-- <label bindtap='chooseWay' data-code='20' class="{{sendStyle}}">外卖</label> -->
             </div>
         </view>


        <view id='changeView'>
            <view id='getSelf' wx:if='{{type=="1"}}'>
                <!-- <view class='address_view {{heightStyle}}'>
                    <image class='topImg' src="{{urlAddress}}/mxShop.png"/>
                    <label>自提地址</label>
                    <label class="{{addStyle}}">
                     <navigator  url='/pages/reserveAddress/reserveAddress?type=1&addressStr={{addressString?addressString:"暂无"}}'
                                hover-class="none">   
                     <view class='blue_style'>
                        {{addressString}}
                       
                     </view>             
                     <image class="icon2" src='{{urlAddress}}/icon_next.png'></image> 
                      </navigator> 
                    </label>

                </view> -->
                <view class='time_view'>
                    <image class='bootImg2 ' src="{{imageUrl}}/mxShop.png" />
                    <label>自提地址</label>
                    <label class="time-wrapper">
                        <view bindtap='addressPickerAction' class='blue_style'>
                            {{addressString}}
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
                <view class='line_s'>
                    <label></label>
                </view>
                <view class='time_view'>
                    <image class='bootImg' src="{{imageUrl}}/meal_icon_time.png" />
                    <label>自提时间</label>
                    <label class="time-wrapper">
                        <view bindtap='timePickerAction' class='blue_style'>
                            {{timeString}}
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
            </view>
            <view id='getWait' wx:if='{{type=="2"}}'>
                <view class='address_view' >
                    <image class='bootImg' src="{{imageUrl}}/meal_icon_location2.png" />
                    <label>配送地址</label>
                    <label>
                        <view  bindtap='addressPickerAction'>
                           <!-- <navigator class='blue_style' url='/pages/reserveAddress/reserveAddress?type={{addrSelfDefined}}'
                                hover-class="none"> -->
                                  <navigator class='blue_style' url='/pages/reserveAddressList/reserveAddressList?type=2&addressId={{addressId}}'
                                hover-class="none">
                                {{chooseAddress||"请选择"}}
                            </navigator>
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
                <view class='line_s'>
                    <label></label>
                </view>
                <view class='time_view'>
                    <image class='bootImg' src="{{imageUrl}}/meal_icon_time.png" />
                    <label>配送时间</label>
                    <label>
                        <view bindtap='timePickerAction' class='blue_style'>
                            {{peisongTime}}
                        </view>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
            </view>
            <view id='waitSend'>
            </view>
        </view>
    </view>
    <view id='goods'>
        <view class='items_style' wx:for="{{shopMarket.cartItems}}" wx:key="{{index}}">
            <image wx:if="{{item.goods.imgUrl==null}}" src="{{urlAddress}}/xiaomai.jpg" />
            <image wx:if="{{item.goods.imgUrl!=null}}" class='market_style' src="{{item.goods.imgUrl}}" />
            <label class="goods_num">
                <p>×</p>{{item.num}}
            </label>
            <label class="goods_name">{{item.goods.goodsName}}</label>
            <label class="goods_money"><span wx:if='{{item.goods.originalPrice!=item.goods.price}}'>¥{{item.goods.originalPrice}}<view
                        wx:if='{{item.goods.originalPrice!=item.goods.price}}' class="line"></view></span>
                <p>¥{{item.goods.price}}</p>
            </label>
        </view>
        <view class='line_l'>
            <label></label>
        </view>
        <view id='preferential'>
            <view class='p_items' bindtap="goSelect">
                <label class="p_name"><span>券</span>优惠券</label>
                <label class="p_money">
                    <label class="noMaiXiang" wx:if='{{shopMarket.autoFlag==1}}'>无优惠券可用</label>
                    <label wx:if='{{shopMarket.autoFlag==3||shopMarket.autoFlag==2}}'>{{shopMarket.showCouponPrice==0||!shopMarket.showCouponPrice?'请选择优惠券':"-¥"+shopMarket.showCouponPrice}}</label>
                    <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                </label>
            </view>
            <view class='p_items'>
                <label class="p_name"><span>促</span>促销活动</label>
                <label class="p_money">
                    <label>-¥{{shopMarket.vipsavingPrice}}</label>
                    <image class="icon" src='{{urlAddress}}/icon_next.png' style='opacity: 0;'></image>
                </label>
            </view>
            <view class='p_items' wx:if="{{shopMarket.supportMx!=3}}">
                <label class="p_name"><span>享</span>麦享会员</label>
                <label class="p_money">
                    <label class="noM_style" bindtap='maixiangTurn' wx:if='{{shopMarket.supportMx==2&shopMarket.mxCheaper}}'>开通会员
                        最多减{{shopMarket.mxSavingAmount}}元</label>
                    <label class="noM_style" bindtap='maixiangTurn' wx:if='{{shopMarket.supportMx==2&!shopMarket.mxCheaper}}'>开通会员
                        再打{{shopMarket.mxDisountRate*10}}折</label>
                    <label wx:if='{{shopMarket.supportMx==1}}'>-￥{{shopMarket.mxSavingAmount?shopMarket.mxSavingAmount:0}}</label>
                    <image wx:if='{{shopMarket.supportMx==1}}' class="icon" src='{{urlAddress}}/icon_next.png' style='opacity: 0;'></image>
                    <image wx:if='{{shopMarket.supportMx!=1}}' class="icon" src='{{urlAddress}}/icon_next.png' style='opacity: 1;'></image>
                </label>
            </view>
            <!-- <view class='p_items'>
                <label class="p_name"><span>送</span>配送费</label>
                <label class="p_money">
                    <p><span>¥1.50</span>¥0.00</p>
                    <image class="icon" src='{{urlAddress}}/icon_next.png' style='opacity: 0;'></image>
                </label>
            </view> -->
        </view>
        <view id='order_msg'>
            <navigator class='' url='/pages/reserveNote/reserveNote' hover-class="none">
                <view class='p_items'>
                    <label class="p_name">订单备注</label>
                    <label class="p_msg">
                        <label wx:if='{{chooseNote}}'>{{chooseNote}}</label>
                        <label class="no_note" wx:if='{{!chooseNote}}'>添加备注</label>
                        <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                    </label>
                </view>
            </navigator>
            <view class='line_l'>
                <label></label>
            </view>
            <view class='p_items'>
                <label class="p_name">支付方式</label>
                <label class="p_money" bindtap='payPickerAction'>
                    <label>{{payText}}</label>
                    <image class="icon" src='{{urlAddress}}/icon_next.png'></image>
                </label>
            </view>
        </view>
    </view>
    <!-- 获取用户信息 -->
    <button wx:if='{{isNeedwx}}' class="nickname-btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">
        <image wx:if='{{isNeedwx}}' src="../../image/nicheng.png"></image>完善昵称
    </button>
    <text wx:if='{{isNeedwx}}' class="nickname-hit">获取微信昵称，有助于为您配送</text>
    <view class='ding'></view>
    <view id='pay_bottom'>
        <label class="pay_left">¥{{shopMarket.promotionPrice}}<span>已优惠¥{{shopMarket.savingPrice}}</span></label>
        <form bindsubmit="formSubmit" report-submit="true">
        <button formType="submit" >
            <!-- <label bindtap='payAction'>立即支付</label> -->
            立即支付
        </button>
    </form>
    </view>
    <!--密码-->
    <view id='passWord_view' wx:if="{{isShow}}">
        <view id='pw'>
            <image class='clo_style' bindtap="closeView" src="../../image/icon_clo.png"></image>
           
            <label class="msg">请输入余额支付密码</label>
            <!-- <label > -->
                     <input class="point" type="password" bindblur='hideView' maxlength="6"  focus='{{input_type}}'
                bindinput="getPassWord" />
                <!-- <li wx:for="{{styleList}}" wx:key='{{index}}'>
                    <span class="{{item}}"></span>
                   
                </li> -->
            <!-- </label> -->
        </view>
    </view>
</view>